package com.ygq.controller;


import DO.PPTDO;
import VO.ChapterVO;
import com.ygq.ChapterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

import java.util.ArrayList;
import java.util.List;

/**
 * 章节管理
 */
@RestController
@RequestMapping("/teacher/chapter")
@Slf4j
public class ChapterController {

    @Autowired
    private ChapterService chapterService;
    /**
     * 获取章节信息
     * @return
     */
    @GetMapping("/getChapter")
    public Result<List<ChapterVO>> getChapter(){
        List<ChapterVO> list = chapterService.getChapter();
        return Result.success(list);
    }
}
